package com.deyuanyun.pic.pbf.controller;

import com.deyuanyun.pic.common.util.RequestUtil;
import com.deyuanyun.pic.common.util.ajax.AjaxSupport;
import com.deyuanyun.pic.pbf.service.ContrastiveAnalysisService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 对比分析
 *
 *
 * @author scalpel.王敏
 * @version [v1.0] 创建时间（2016/7/5）
 * @see // 引用的类
 * Method List:
 * 1.----------------
 * 2.----------------
 * History:
 */
@Controller
@RequestMapping("/pbf/contrastiveAnalysis")
public class ContrastiveAnalysisController {

    @Resource
    private ContrastiveAnalysisService contrastiveAnalysisService;

    @RequestMapping("/page.html")
    public String page()
    {
        return "/pbf/dashboard/changeTrend";
    }


    @ResponseBody
    @RequestMapping("/queryData.json")
    public void queryData(HttpServletRequest request)
    {

        Map param= RequestUtil.parseRequestParamToHashMap(request);
        AjaxSupport.sendSuccessText("",contrastiveAnalysisService.query(param));
    }
}
